package com.example.mcdonaldapplication.fragment

import android.os.Bundle
import androidx.fragment.app.Fragment
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.example.mcdonaldapplication.R
import com.example.mcdonaldapplication.info.GoodsAdapter

class BucketFragment : Fragment() {
    private var layoutManager: LinearLayoutManager? = null
    private var goodsAdapter: GoodsAdapter? = null

    override fun onCreateView(
        inflater: LayoutInflater, container: ViewGroup?,
        savedInstanceState: Bundle?
    ): View {
        val view=inflater.inflate(R.layout.fragment_bucket,container,false)
        val recycleView=view.findViewById<RecyclerView>(R.id.recyclerViewBucket)
        recycleView.layoutManager=this.layoutManager
        recycleView.adapter=this.goodsAdapter
        return view
    }
    fun prepare(layoutManager: LinearLayoutManager, GoodsAdapter: GoodsAdapter){
        this.layoutManager=layoutManager
        this.goodsAdapter=GoodsAdapter
    }
}